<template>
  <div>
    <el-row style="height: auto;margin: 0">
      <iframe scrolling="no" frameborder="0" id="reportFrame" :src="src"></iframe>
    </el-row>
  </div>
</template>

<script>
import { reportURL } from '@/config/baseConfig'

export default {
  name: 'index',
  data () {
    return {
      src: reportURL + 'index.cpt' + '&__bypagesize__=false'
    }
  },
  methods: {

  },
  mounted () {
    const oIframe = document.getElementById('reportFrame')
    const deviceWidth = Number(document.documentElement.clientWidth)
    const deviceHeight = Number(document.documentElement.clientHeight)
    oIframe.style.width = (deviceWidth - 120) / deviceWidth * 100 + 'vw' // 数字是页面布局宽度差值
    oIframe.style.height = (deviceHeight - 100) / deviceHeight * 100 + 'vh' // 数字是页面布局高度差
  }
}
</script>

<style scoped>
  #reportFrame {
    /*width: 80vw;*/
    /*height: 80vh;*/
  }
</style>
